package edu.must.uh.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import edu.must.uh.util.SqlUtils;
import edu.must.uh.util.Tools;
import edu.must.uh.util.ToolsOfString;

public class BaseUserExImpl {
    
    
    public List<Map<String, Object>> getUserList() throws SQLException {
    	 
        String sqlString = "SELECT  UserId ,Account ,RealName FROM base_user where DeleteMark = 0 order by  SortCode;" ; 
           
        List<Map<String,Object>>resList = SqlUtils.getMySqlInstance().getlist(sqlString);
        return resList; 
    }
    
    
    public Map<String, Object> getUserByUserName(String userName) throws SQLException {
      
        String sqlString = "SELECT * FROM base_user WHERE upper(Account) = '"+userName +"'"; 
        Map<String, Object> resMap =  SqlUtils.getMySqlInstance().getMap(sqlString); 
        return resMap;
    }

}
